From da3307b4373a68de7b1caed09a51908a3f58060f Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sun, 4 Aug 2024 15:45:31 -0500 Subject: [PATCH] Inherit from pgwui_upload_core; assume the template is for uploading --- .../TEMPLATE/src/pgwui_TEMPLATE/templates/TEMPLATE.mak.makish | 4 ++-- .../TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/templates/TEMPLATE.mak.makish b/src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/templates/TEMPLATE.mak.makish index bc9b7b4..d4d8b24 100644 --- a/src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/templates/TEMPLATE.mak.makish +++ b/src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/templates/TEMPLATE.mak.makish @@ -31,10 +31,10 @@ <%text>< %% ! from pgwui_common.path import asset_abspath - auth_base_mak = asset_abspath('pgwui_common:templates/auth_base.mak') + upload_base_mak = asset_abspath('pgwui_common:templates/upload_base.mak') %% > -< %% inherit file="$ {auth_base_mak}" /> +< %% inherit file="$ {upload_base_mak}" /> < %% block name="title">$ {pgwui['${component.lower()}']['menu_label']} < %% block name="meta_keywords"> diff --git a/src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak b/src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak index 1340952..862ac00 100644 --- a/src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak +++ b/src/pgwui_develop/TEMPLATE/src/pgwui_TEMPLATE/views/TEMPLATE.py.mak @@ -24,6 +24,7 @@ import logging import pgwui_core.core import pgwui_core.utils from pgwui_common.view import auth_base_view +import pgwui_upload_core.views.upload from ${component.lower()} import exceptions as ${short_name}_ex @@ -49,6 +50,9 @@ def ${short_name}_view(request): response.setdefault('pgwui', dict()) response['pgwui']['${component.lower()}'] = settings['pgwui']['${component.lower()}'] + pgwui_upload_core.views.upload.set_upload_response( + '${component.lower()}', request, response) + if response['report_success']: if pgwui_core.utils.is_checked(response['csv_checked']): upload_fmt = 'CSV' -- 2.34.1